﻿using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WomanMotion.WebApi.Infrastructure.AppSettings.Model;

namespace WomanMotion.WebApi.Infrastructure.AppSettings
{
    /// <summary>
    /// 配置文件读取帮助类
    /// </summary>
    public static class AppSettingsHelper
    {
        public static UserId userId { get; set; }

        /// <summary>
        /// 初始化配置文件读取
        /// </summary>
        /// <param name="configuration"></param>
        public static void Init(IConfiguration configuration)
        {
            userId = configuration.GetSection("UserId").Get<UserId>();
        }
    }
}